package com.example.mountainwalker.service.impl;

import com.example.mountainwalker.entity.HotelImageInfo;
import com.example.mountainwalker.mapper.HotelImageMapper;
import com.example.mountainwalker.service.HotelImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HotelImageImpl implements HotelImageService {

    @Autowired
    private HotelImageMapper hotelImageMapper;

    @Override
    public List<HotelImageInfo> getAllHotelImages() {
        return hotelImageMapper.getAllHotelImages();
    }

    @Override
    public HotelImageInfo getHotelImageById(Integer id) {
        return hotelImageMapper.getHotelImageById(id);
    }

    @Override
    public int insertHotelImage(HotelImageInfo hotelImageInfo) {
        return hotelImageMapper.insertHotelImage(hotelImageInfo);
    }

    @Override
    public int updateHotelImage(HotelImageInfo hotelImageInfo) {
        return hotelImageMapper.updateHotelImage(hotelImageInfo);
    }

    @Override
    public int deleteHotelImage(Integer id) {
        return hotelImageMapper.deleteHotelImage(id);
    }

    @Override
    public List<HotelImageInfo> getImagesByHotelId(Integer hotelId) {
        return hotelImageMapper.getImagesByHotelId(hotelId);
    }
}